home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / demos / asltest.pas next >
Pascal/Delphi Source File  |  2000-01-01  |  1KB  |  47 lines

  1. PROGRAM AslTest;
  2.  
  3. uses Exec, Utility, Asl, vartags,msgbox;
  4.  
  5.  
  6. {    
  7.      History:
  8.      Now use TAGS and pas2c.
  9.      Removed the opening of asl.library,
  10.      handled by unit asl.
  11.      1 Nov 1998.
  12.  
  13.      Added MessageBox for report.
  14.      31 Jul 2000.
  15.  
  16.      nils.sjoholm@mailbox.swipnet.se
  17. }
  18.  
  19. VAR
  20.     fr    : pFileRequester;
  21.     dummy : BOOLEAN;
  22. BEGIN
  23.  
  24.     fr := AllocAslRequest(ASL_FileRequest,TAGS(
  25.                           ASLFR_InitialPattern,Longstr('#?'),
  26.                           ASLFR_TitleText,Longstr('Test av ASL-Requester by NS'),
  27.                           ASLFR_DoPatterns,ltrue,
  28.                           TAG_DONE));
  29.  
  30.     IF fr <> nil THEN BEGIN
  31.         dummy := AslRequest(fr,NIL);
  32.         if dummy then begin
  33.            MessageBox('Test of Asl',
  34.                       ' The path is :' +
  35.                       strpas(fr^.rf_Dir) +
  36.                       chr(10) +
  37.                       'And the file is :' +
  38.                       strpas(fr^.rf_File),
  39.                       'OK');
  40.         end else MessageBox('Test of Asl','You canceled','OK');
  41.         FreeAslRequest(fr);
  42.     END;
  43. END.
  44.  
  45.  
  46.  
  47.